Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for running health checks without threads #362

Merged
merged 8 commits into from
Dec 6, 2023
Merged

Add configuration for running health checks without threads #362

merged 8 commits into from
Dec 6, 2023

Conversation

mnitchie
Copy link
Contributor

@mnitchie mnitchie commented Mar 30, 2023

Addresses #360

A configuration option to allow for running health checks without spinning up threads would be useful in a few different scenarios.

This adds a HEALTH_CHECK["DISABLE_THREADING"] config to support this. The config defaults to False so existing consumers of the lib will still work the same way.

h/t @ActionScripted

@dimaqq
Copy link

dimaqq commented Jul 18, 2023

@ilyamonakov review pls

@rapkyt
Copy link

rapkyt commented Nov 30, 2023

Can this be merged? I have randoms time outs only for the health check endpoint that I think it will be solved by not using threading, thanks!

@mnitchie
Copy link
Contributor Author

mnitchie commented Dec 6, 2023

@frankwiles and/or @jefftriplett - thanks for your work on this repo! Curious what you think of this and if it could be merged.

@frankwiles
Copy link
Member

Yeah I think we can merge this. I didn't even remember it was using threads, but can definitely see that getting in the way.

My plan/hope for v2 (when I can find the time for it) is for there to be a separate view that will run the checks async for a nice UI/UX display, but keep them sync obviously for automated use cases (i.e. load balancers knowing which are healthy, etc)

@frankwiles frankwiles merged commit 7328eaa into revsys:master Dec 6, 2023
@frankwiles
Copy link
Member

I'll get a release put together in a couple of days.

@ron8mcr
Copy link

ron8mcr commented Jan 12, 2024

I'll get a release put together in a couple of days.

@frankwiles Hope that #397 will be included to this release too

mnitchie added a commit to mnitchie/django-health-check that referenced this pull request Apr 19, 2024
Updates documentation for disabling threading, implemented in revsys#362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants